#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
template <class T>int length(T &arr);
template <class T>void print(T &arr);
int main()
{
    int a[]={3,1,3,5,3,5,2,5,7};
    vector<int> vect(a,a+length(a));
    sort(vect.begin(),vect.end(),less_equal<int>());
    print(vect);
}
//计算数组长度
template <class T>int length(T &arr)
{
    return end(arr)-begin(arr);
}
//打印数组元素
template <class T>void print(T &arr)
{
    for (int i = 0; i < length(arr); i++)
    {
        cout<<arr[i]<<" ";
    }
    cout<<endl;
}